Add CloudDevice service class#1709
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the CloudDeviceAPI service to support synchronous and asynchronous payment requests, retrieving connected devices, and checking device status, complete with unit tests and mock data. Feedback on the implementation highlights a potential runtime crash and type unsafety in the async method when parsing responses, as well as unintended side effects caused by mutating the requestOptions parameter directly in getConnectedDevices.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Add
CloudDeviceApiservice class to support the Cloud Device API endpoints:/merchants/{merchantAccount}/devices/{deviceId}/sync/merchants/{merchantAccount}/devices/{deviceId}/async/merchants/{merchantAccount}/connectedDevices/merchants/{merchantAccount}/devices/{deviceId}/statusAdded supporting models (which are not part of the OpenAPI spec), unit tests and mock data.